# hi
import json


def init():
    """Initialize model
    Returns: model
    """
    return {}


def process_image(handle=None, input_image=None, args=None, **kwargs):
    """Do inference to analysis input_image and get output
    Attributes:
    handle: algorithm handle returned by init()
    input_image (numpy.ndarray): image to be process, format: (h, w, c), BGR
    Returns: process result
    """

    # Process image here
    fake_result = {}
    fake_result["algorithm_data"] = {
        "is_alert": False,
        "target_count": 0,
        "target_info": [],
    }
    fake_result["model_data"] = {}
    fake_result["model_data"]["objects"] = [
        {
            "model_data": {
                "objects": [
                    {
                        "x": 716,
                        "y": 716,
                        "height": 646,
                        "width": 233,
                        "id": "1",
                        "name": "person",
                    },
                    {
                        "xmin": 1068,
                        "ymin": 475,
                        "xmax": 1173,
                        "ymax": 571,
                        "id": "1",
                        "name": "head",
                        "toward": "back",
                        "glasses": "0",
                        "gender": "-1",
                        "age": "26",
                        "race": "0",
                        "emotion": "2",
                        "mask": "0",
                        "hat": "0",
                        "whiskers": "0",
                    },
                ]
            }
        }
    ]

    return json.dumps(fake_result, indent=4)
